package svc

import (
	"exam/api/internal/config"
	"exam/exzmrpc/exzmrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	ExamRpc exzmrpcclient.Exzmrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		ExamRpc: exzmrpcclient.NewExzmrpc(zrpc.MustNewClient(c.ExamRpc)),
	}
}
